<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--[if lt IE 9]>
    <script src="../js/jquery-1.11.3.js"></script>
    
<![endif]-->
		<!--[if gte IE 9]><!-->
		<script src="../js/jquery-3.1.1.js"></script>
		<!--<![endif]-->
		<script type="text/javascript">
$(document).ready(function(){
  	$("#form1 > :input").css("background-color","yellowgreen");
    $("#form2 > :text").css("background-color","darkseagreen");
    $("#form2 > :password").css("background-color","red");
    //注意：我们使用jQuery .wrap 方法来设置选中的元素高亮，Firefox 浏览器不支持单选按钮设置背景颜色。
    $("#form2  :radio").wrap("<span style='background-color:red' />");
    $("#form2  :checkbox[value=Car]").wrap("<span style='background-color:red' />");

    $("#form2 > :file").css("background-color","darkolivegreen");
    $("#form2 > :reset").css("background-color","green");
    $("#form2 > :image").css("background-color","cadetblue");
    $("#form2 > :button").css("background-color","lightgreen");
	$("#form2 :selected").css("background-color","greenyellow");
	$("#form3 :enabled").css("background-color","cornflowerblue");
	$("#form3 :disabled").css("background-color","lightgoldenrodyellow");
	$("#form3 :checked").wrap("<span style='background-color:bisque' />")
});
		</script>
	</head>

	<body>
			<br>	form1<br>
		<form id="form1" action="">
			用户名: <input type="text" name="user"><br> 密码: <input type="password" name="password"><br>
			性别<select name="sex">
				<option value="男"  >男</option>
				<option value="女">女</option>
			</select><br>
			<button type="button">没用的按钮</button>
			<input type="button" value="另外一个没用的按钮"><br>
			<input type="reset" value="重置">
			<input type="submit" value="提交"><br>
		</form>
			<br>	form2<br>
		<form id="form2" action="">
			用户名:
			<input type="text" name="user"><br> 密码: 
			<input type="password" name="password"><br>
			性别男:<input type="radio" name="sex" value="m"><br>
女<input type="radio" name="sex" value="f"><br><br>
我有一辆自行车:
<input type="checkbox" name="vehicle" value="Bike"><br>
我有一辆汽车:
<input type="checkbox" name="vehicle" value="Car"><br>
我有一架飞机:
<input type="checkbox" name="vehicle" value="Airplane"><br>
兼容性: <input type="image" src="../img/compatible_ie.gif" width="31" height="30">
			<button type="button">没用的按钮</button><br>
 汽车品牌<select>
  <option>Volvo</option>
  <option selected="selected">Saab</option>
  <option>Mercedes</option>
  <option>Audi</option>
</select>
			文件: <input type="file" name="myfile"><br>
			<input type="button" value="另外一个没用的按钮"><br>
			<input type="reset" value="重置"><br>
			<input type="submit" value="提交"><br>
		</form>
		
		<br>	form3<br>
		<form id="form3" action="">
	用户名: <input type="text" name="user"><br>
	ID:<input type="text" name="id" disabled="disabled">
	年龄:
	<select disabled="disabled">
		<option>20-30</option>
		<option>30-50</option>
		<option>50+</option>
	</select>
	
	我有一辆自行车:
<input type="checkbox" name="vehicle" value="Bike"><br>
我有一辆汽车:
<input type="checkbox" name="vehicle" value="Car" checked="checked"><br>
我有一架飞机:
<input type="checkbox" name="vehicle" value="Airplane"><br>

	<input type="submit">
</form>
	</body>

</html>